@use '../core' as *;

.headerSearchBox {
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
    min-width: 320px;
    padding: $spacing-size-2 $spacing-size-4;
    border-radius: var(--radius-md);
    background-color: rgba(0, 0, 0, 0.1);
    color: var(--color-white);
    cursor: pointer;

    #{$selector-darkmode} & {
        background-color: rgba(255, 255, 255, 0.06);
    }

    &::-webkit-search-decoration,
    &::-webkit-search-cancel-button {
        display: none;
    }

    &:hover .placeholder,
    &:hover :global(.icon) {
        opacity: 0.7;
    }

    &:hover .kbdShortcut {
        opacity: 1;
    }

    > * {
        transition: opacity $transition-default-timing;
    }

    :global(.icon) {
        --icon-size: 18px;
        --color-icon: var(--color-white);

        margin-right: $spacing-size-1;
        opacity: 0.5;
    }
}

.placeholder {
    opacity: 0.7;
}

.kbdShortcut {
    margin-left: auto;
    opacity: 0.8;
    font-size: var(--text-fs-sm);

    animation: fadeIn 0.2s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}